@echo off

call "%VS80COMNTOOLS%vsvars32.bat"
echo Current directory is:
cd

rem DEVENV /REBUILD "Debug" "..\HiMmiTest\HiMmiTest\HiMmiTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\DriverAdapter\DriverAdapter\DriverAdapter.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\VersionInfo\VersionInfo\VersionInfo.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\TouchpadTest\TouchpadTest\TouchpadTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\LcdTest\LcdTest\LcdTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\LedTest\LedTest\LedTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\VibrationTest\VibrationTest\VibrationTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\KeyboardTest\KeyboardTest\KeyboardTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\PowerTest\PowerTest\PowerTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\BacklightTest\BacklightTest\BacklightTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\CameraTest\CameraTest\CameraTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\SpeakerTest\SpeakerTest\SpeakerTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\ReceiverTest\ReceiverTest\ReceiverTest.vcproj"
rem if errorlevel 1 goto out


rem DEVENV /REBUILD "Debug" "..\EarphoneTest\EarphoneTest\EarphoneTest.vcproj"
rem if errorlevel 1 goto out


rem DEVENV /REBUILD "Debug" "..\MobileMicTest\MobileMicTest\MobileMicTest.vcproj"
rem if errorlevel 1 goto out


rem DEVENV /REBUILD "Debug" "..\EarphoneMicTest\EarphoneMicTest\EarphoneMicTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\FMTest\FMTest\FMTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\SDCardTest\SDCardTest\SDCardTest.vcproj"
rem if errorlevel 1 goto out


rem DEVENV /REBUILD "Debug" "..\BluetoothTest\BluetoothTest\BluetoothTest.vcproj"
rem if errorlevel 1 goto out


rem DEVENV /REBUILD "Debug" "..\GpsTest\GpsTest\GpsTest.vcproj"
rem if errorlevel 1 goto out


rem DEVENV /REBUILD "Debug" "..\UIMCardTest\UIMCardTest\UIMCardTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\SIMCardTest\UIMCardTest\UIMCardTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\WifiTest\WifiTest\WifiTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\MTVTest\MTVTest\MTVTest.vcproj"
rem if errorlevel 1 goto out

rem DEVENV /REBUILD "Debug" "..\CurrentTest\CurrentTest\CurrentTest.vcproj"
rem if errorlevel 1 goto out


rem DEVENV /REBUILD "Debug" "..\InnerCameraTest\CameraTest\CameraTest.vcproj"
rem if errorlevel 1 goto out



:out
if not errorlevel 1 goto skiperror
echo ****************************************************************************
echo IMPORTANT: If your .NET environment crashed during the build, you should
echo            disable all your addins and try again.  To disable the addins: 
echo              1. Start VC.NET
echo              2. Go to Tools/Add-in Manager
echo              3. Uncheck all the checkboxes in the Startup column
echo ****************************************************************************
pause

:skiperror
echo ****************************************************************************
echo IMPORTANT: Build OK
echo ****************************************************************************
